<?php

define("ROOT_PATH", str_replace("include/init.php", "", str_replace("\\", "/", __FILE__)));

require(ROOT_PATH . "/include/smarty/Smarty.class.php");
require(ROOT_PATH . "/include/config.php");

$productImgPath = ROOT_PATH."upload/";
$facilityImgPath = ROOT_PATH."upload/facility/";

// 初始化smarty
$smarty = new Smarty;
$smarty->template_dir = ROOT_PATH . $smarty_template_dir;
$smarty->compile_dir = ROOT_PATH . $smarty_compile_dir;
$smarty->config_dir = ROOT_PATH . $smarty_config_dir;
$smarty->cache_dir = ROOT_PATH . $smarty_cache_dir;
$smarty->left_delimiter = '<{';
$smarty->right_delimiter = '}>';
require(ROOT_PATH . "/include/mysql.class.php");
$db = new cls_mysql($db_host, $db_user, $db_pass, $db_name, 'utf8');
$db_host = $db_user = $db_pass = $db_name = NULL;

require(ROOT_PATH . "/include/lib_common.php");
$time = time();
?>
